﻿using System;
using System.Runtime.InteropServices;

public class FBLuaDebugger
{
	enum EConsoleType
	{
		TYPE_NONE,
		TYPE_GUI,
		TYPE_CONSOLE
	};


	[DllImport("unityLuaDebug")] 
	private static extern void FBLogShowConsole( );

	[DllImport("unityLuaDebug")] 
	private static extern void FBLogInitDebug( IntPtr luaStack, EConsoleType consoleType );

	[DllImport("unityLuaDebug")] 
	private static extern void FBLogEnableDebug( );
	
	public static void showConsole( )
	{
#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN
		FBLogShowConsole( );
#endif
	}
		
	public static void initDebug( IntPtr luaStack )
	{
#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN
		FBLogInitDebug( luaStack, EConsoleType.TYPE_GUI );
#endif
	}
	
	public static void enableDebug( )
	{
#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN
		FBLogEnableDebug( );
#endif
	}
}
